// FakeQTalkDlg.h : header file
//

#pragma once
#include "DataChannel.h"
#include "ProtoDef.h"

// CFakeQTalkDlg dialog
class CFakeQTalkDlg 
	: public CDialog
	, public IDataChannelEvent
{
// Construction
public:
	CFakeQTalkDlg(CWnd* pParent = NULL);	// standard constructor
	~CFakeQTalkDlg();

// Dialog Data
	enum { IDD = IDD_FAKEQTALK_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

public:
	virtual void	OnReceData(WORD wCmd, PBYTE pBuffer, int nLen);
	virtual void	OnConnect();
	virtual void	OnClose(int nErrorCode);

	LRESULT	ProcessCommandRequest(WPARAM wParam, LPARAM lParam);

private:
	void	OnRecvSessionID(PBYTE pBuffer, int nLen);
	void	OnMatchSuccess(PBYTE pBuffer, int nLen);
	void	OnReplyPassThrough(PBYTE pBuffer, int nLen);
	void	OnRecvPassThroughData(PBYTE pBuffer, int nLen);

	void	OutputInformation(CString strInfo);
	void	SetupWindow();
	void	SendCopyData(PBYTE pBuffer, int nLen);

	void	OnRecvLogData(PBYTE pBuffer, int nLen);

private:
	CDataChannel	m_oDataChannel;
	HWND			m_hWnd;
	HWND			m_hViewer;
	int				m_nLogLevel;
	char*			m_pCompess;
};
